{% extends "layout.html" %}

{% block content %}
<form method="POST" enctype="multipart/form-data">
    {% csrf_token %}
    {% for field in form %}
    {% if field.name != 'avatar' %}
    <p>{{ field.label_tag }} {{ field }} </p>
    {% endif %}
    {% endfor %}
    <img src="{{object.avatar.url}}" />
    <input type="file" value="choose an image" name="avatar" />
    <input type="submit" value="Save" />
</form>
{% endblock %}
